package cn.edu.scau.cmi.linzhanyi.composite;

import java.util.List;

public class People implements Component{
    private String name;
    private Component parent;
    public People(String name) {
        this.name = name;
    }

    @Override
    public void add(Component c) {

    }

    @Override
    public void remove(Component c) {

    }

    @Override
    public List<Component> get() {
        return null;
    }

    @Override
    public String getNmae() {
        return name;
    }

    @Override
    public void setNmae(String name) {
        this.name=name;
    }

    @Override
    public void addAll(Component... c) {

    }

    @Override
    public String say(String s) {
        return s+"        "+"我是"+name;
    }

    @Override
    public Component getParent() {
        return parent;
    }

    @Override
    public void setParent(Component parent) {
        this.parent=parent;
    }
    @Override
    public String toString(){
        return name;
    }
}
